package com.zxx.pattern.buildPattern.build3;

import com.zxx.pattern.buildPattern.build3.product.ChickenBurger;
import com.zxx.pattern.buildPattern.build3.product.Coke;
import com.zxx.pattern.buildPattern.build3.product.Pepsi;
import com.zxx.pattern.buildPattern.build3.product.VegBurger;

/**
 *  MealBuilder 类，实际的 builder 类负责创建 Meal 对象。
 * @author zxx on 2020/12/11
 */
public class MealBuilder {

    public Meal prepareVegMeal() {
        Meal meal = new Meal();
        meal.addItem(new VegBurger());
        meal.addItem(new Coke());
        return meal;
    }

    public Meal prepareNonVegMeal() {
        Meal meal = new Meal();
        meal.addItem(new ChickenBurger());
        meal.addItem(new Pepsi());

        return meal;
    }

}
